package com.example.up.util;

import android.app.ActivityManager;
import android.content.Context;
import android.content.Intent;
import android.os.Environment;

public class Content {

	public static String path = Environment.getExternalStorageDirectory().getAbsolutePath() + "/" + "download";
	public static String packger = "com.moco.launcher";
	private static final String ACTION_UPDATE_START = "com.moco.update.start";
	private static final String ACTION_UPDATE_END = "com.moco.update.end";

	public static void killMoco(Context context) {
		ActivityManager am = (ActivityManager) context
				.getSystemService(Context.ACTIVITY_SERVICE);
		am.killBackgroundProcesses(packger);
	}

	public static void sendStartBoradcast(Context mContext, String type) {
		Intent intent = new Intent();
		intent.setAction(ACTION_UPDATE_START);
		mContext.sendBroadcast(intent);
	}

	public static void sendStopBoradcast(Context mContext, String type) {
		Intent intent = new Intent();
		intent.setAction(ACTION_UPDATE_END);
		mContext.sendBroadcast(intent);
	}
}
